<template>
  <el-card>
    <e-table :tableData="tableData" :columns="columns" :loading="loading" :pageObj="null">
      <el-table-column
        slot="order"
        label="序号"
        type="index"
        :index="indexMethod"
        width="50"
        align="center"
      />
      <el-table-column slot="operate" label="操作" align="center" fixed="right" width="300">
        <template slot-scope="scope">
          <el-button size="small" type="text" @click="edit(scope.row)">编辑</el-button>
          <el-divider direction="vertical" />
          <el-button size="small" type="text" @click="startUsing(scope.row)">启用</el-button>
        </template>
      </el-table-column>
    </e-table>
  </el-card>
</template>

<script>
export default {
  data() {
    return {
      tableData: [
        { name: '小毛1', url: 'wwww' },
        { name: '小毛2', url: 'wwww' },
        { name: '小毛3', url: 'wwww' },
        { name: '小毛4', url: 'wwww' },
        { name: '小毛1', url: 'wwww' },
        { name: '小毛2', url: 'wwww' },
        { name: '小毛3', url: 'wwww' },
        { name: '小毛4', url: 'wwww' },
        { name: '小毛1', url: 'wwww' },
        { name: '小毛2', url: 'wwww' }
      ],
      columns: [{ slot: 'order' }, { label: '名称', prop: 'name' }, { label: '链接', prop: 'url' }, { slot: 'operate' }], // 操作列
      loading: false
    }
  },
  methods: {
    indexMethod(index) {
      return index + 1
    }
  }
}
</script>

<style>
</style>